home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 12 - 1996 / 12.09 Sep 96 / C++ DebugStr / streamstructsmac.cp < prev    next >
Encoding:
Text File  |  1996-06-18  |  880 b   |  35 lines  |  [TEXT/R*ch]

  1. // (c) copyright 1995,1996, Jon Kalb, Liberty Software
  2. // Kalb@LibertySoft.com
  3. // You may freely incorporate this code into any machine-
  4. // readable project. You may modify this code, but you may
  5. // not remove this statement. 
  6.  
  7. #include "streamstructsmac.h"
  8.  
  9. // inserters
  10.  
  11. ostream &operator<<(ostream &stream, const Point &rhs)
  12. {
  13.     stream << ".v(" << rhs.v << ") ";
  14.     stream << ".h(" << rhs.h << ") ";
  15.     return stream;
  16. }
  17.  
  18. ostream &operator<<(ostream &stream, const Rect &rhs)
  19. {
  20.     stream << ".t(" << rhs.top        << ") ";
  21.     stream << ".l(" << rhs.left        << ") ";
  22.     stream << ".b(" << rhs.bottom    << ") ";
  23.     stream << ".r(" << rhs.right    << ") ";
  24.     return stream;
  25. }
  26.  
  27. ostream &operator<<(ostream &stream, const BitMap &rhs)
  28. {
  29.     stream << ".baseAddr(" << (void *)rhs.baseAddr << ") ";
  30.     stream << ".rowBytes(" << rhs.rowBytes << ")\n";
  31.     stream << ".bounds(" << rhs.bounds        << ") ";
  32.     return stream;
  33. }
  34.  
  35.